#include<iostream>
int main()
{
	int n,i,k,a[20];
	std::cout<<"n=";std::cin>>n;
	std::cout<<"k=";std::cin>>k;
	for(i=0;i<n;i++)
		std::cin>>a[i];
	std::cout<<"Sirul este:(";
	for(i=0;i<n;i++)
		std::cout<<a[i]<<" ";
	std::cout<<")\n Elementele divizibile cu k("<<k<<") sunt:(";
	for(i=0;i<n;i++)
		if(a[i]%k==0)
			std::cout<<a[i]<<" ";
	std::cout<<")\n";
	return 0;
}
